/*
 * =====================================================================================
 *
 *       Filename:  tuple.h
 *
 *    Description:  abstract for the 4 tuple of human model
 *
 *        Version:  1.0
 *        Created:  07/29/09 09:29:05
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Gestrom Drawn (mn), zhcfreesea@gmail.com
 *        Company:  zhc
 *
 * =====================================================================================
 */

#ifndef _TUPLE_H
#define _TUPLE_H

typedef enum {EAT, SLEEP} Action;
typedef enum {NONE, HUNGER} Excitation;
typedef enum {FULL, HUNGRY} State;
typedef unsigned int Time;

//class Tuple abstract the 4 tuple in human model
class Tuple{
    private:
        Action _action;
        Excitation _excitation;
        State _state;
        Time _time;
    public:
        Tuple(): _action(SLEEP), _excitation(NONE), _state(FULL), _time(0) {}
        Tuple(Action action_, Excitation excitation_, State state_, Time time_):
            _action(action_), _excitation(excitation_), _state(state_), _time(time_) {}

        void time_add(void) {_time++;}

        void show_tuple(void);

        void set_action(Action action_) {_action = action_;}
        void set_excitation(Excitation excitation_) {_excitation = excitation_;}
        void set_state(State state_) {_state = state_;}
        void set_time(Time time_) {_time = time_;}//do not use this method, use time_add

        Action get_action(void) {return _action;}
        Excitation get_excitation(void) {return _excitation;}
        State get_state(void) {return _state;}
        Time get_time(void) {return _time;}
};

#endif
